import { CircleShape } from "../../lib/kgame/d2/shape/CircleShape";
import { ECSScene } from "../../lib/kgame/ecs/ECSScene";
import SCmpPoolMgr from "../scmp/SCmpPoolMgr";

/**
 * 碰撞器创建
 */
export default class ColliderFactory {

    /**
     * 创建圆形碰撞器
     * @param scene
     * @param radius
     */
    static createCircle(scene: ECSScene, radius: number) {
        const circle = scene.getCmp(SCmpPoolMgr).getRecyclePool(CircleShape).alloc();
        circle.radius = radius;
        return circle;
    }


}